From 2a34e44e4664734a46f64a180a5016d069dba71e Mon Sep 17 00:00:00 2001 From: "cl349@freefall.cl.cam.ac.uk" Date: Tue, 20 Jul 2004 10:41:31 +0000 Subject: [PATCH] bitkeeper revision 1.1108.6.1 (40fcf6dbc9Be6szJlWRlS855NTQlrg) Use the HYPERVISOR_block now, after adding a check if there's RCU work. --- linux-2.6.7-xen-sparse/arch/xen/i386/kernel/time.c | 7 +------ linux-2.6.7-xen-sparse/arch/xen/kernel/process.c | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/time.c b/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/time.c index 8883256b19..c6fa43f378 100644 --- a/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/time.c +++ b/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/time.c @@ -479,6 +479,7 @@ int set_timeout_timer(void) { u64 alarm = 0; int ret = 0; + int cpu = smp_processor_id(); spin_lock(&timerlist_lock); @@ -490,12 +491,6 @@ int set_timeout_timer(void) */ alarm = __jiffies_to_st(next_timer_interrupt()); -#if 0 - /* Tasks on the timer task queue expect to be executed on the next tick. */ - if ( TQ_ACTIVE(tq_timer) ) - alarm = __jiffies_to_st(jiffies + 1); -#endif - /* Failure is pretty bad, but we'd best soldier on. */ if ( HYPERVISOR_set_timer_op(alarm) != 0 ) ret = -1; diff --git a/linux-2.6.7-xen-sparse/arch/xen/kernel/process.c b/linux-2.6.7-xen-sparse/arch/xen/kernel/process.c index c884a02757..a9282773d6 100644 --- a/linux-2.6.7-xen-sparse/arch/xen/kernel/process.c +++ b/linux-2.6.7-xen-sparse/arch/xen/kernel/process.c @@ -11,11 +11,11 @@ void xen_cpu_idle (void) { local_irq_disable(); - if (need_resched()) { + if (need_resched() || !list_empty(&RCU_curlist(cpu))) local_irq_enable(); return; } - if (0 && set_timeout_timer() == 0) { + if (set_timeout_timer() == 0) { /* NB. Blocking reenable events in a race-free manner. */ HYPERVISOR_block(); return; -- 2.30.2